//
//  Test'.swift
//  Closore
//
//  Created by 郑东喜 on 2016/11/16.
//  Copyright © 2016年 郑东喜. All rights reserved.
//

import UIKit

class Test_: NSObject {
    
    //单例
    static let shared = Test_()
    
    //外部闭包
    var ImgData:((_ data:Data)->Void)?
    
    func choosePhoto(_data:@escaping ((_ data:Data)->Void)) -> Void {
        ImgData = _data
        
        let img = UIImage.init(named: "ico")
        
        let imgData = UIImageJPEGRepresentation(img!, 0.1)
        
        ImgData!(imgData!)
    }
    
}
